///implementation of Groovey Renderer Class

#include "grenderer.hpp"
#include <GL/glut.h>
GRenderer::GRenderer(): state(0)
{
}///////////////////////////Renderer Constructor

void GRenderer::Render(GParticle_List& GPList)
{
    ////okay folks, let's get real here. This is going to be the oddball of the bunch
    ///////for now, let's just code this hard... but later this will take a functor
    ////how funky is that? Funky... that's how... dude... yo.
    ////GLUT, me bucko... let's roll!
    
    glBegin(GL_POINTS);
    	glColor3f(1.0,1.0,1.0);
    	int i;
    	for (i = GPList.getSize() - 1 ; i >= 0; --i){ ///note! we need to minus one! because the list starts at index 0!
    	    GPList[i].drawParticles();
    	}
	glEnd();
    
    /*///as if I know how to use these guys:
    glutDisplayFunc(renderScene);
    glutIdleFunc(renderScene);
    glutMainLoop();
    */
    ////nextState(); ///need to get this fixxed
    
}///////////////////////////Render()

void GRenderer::nextState()
{
    if (state){///we are currently ready to proceed.
        state = 0;///then the next state is that we are busy
    }
    else{		///we are currently busy
        state = 1;///then the next state is that we are ready
    }
}///////////////////////////State Transition()

